package com.spring.annotation.importanno;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author HBZ
 * @Date 2020/8/16 16:23
 * @Description
 */
public class Test {
    public void aa(){
        synchronized(this){
            System.out.println();
        }
    }
    public static void main(String[] args) {
        //这里的参数代表要做操作的类
        AnnotationConfigApplicationContext applicationContext=new AnnotationConfigApplicationContext();
        applicationContext.register(MyConfig.class);
        applicationContext.refresh();
        String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
        for (String name : beanDefinitionNames){
            System.out.println(name);
        }
    }
}
